<template>
    <div>{{ msg }}

        <div>
            <h6>模板下载</h6>
            <button @click="downloadTemplate">下載模板</button>
            <el-button @click="toLogout(false)">模拟退出登录</el-button>
        </div>
    </div>
</template>

<script>
import { mapMutations } from 'vuex/dist/vuex.common'

export default {
    name: 'Disclosure',
    data() {
        return {
            msg: '信用信息披露处理页面'
        }
    },
    methods: {
        downloadTemplate() {
            this.$axios({
                method: 'post',
                url: this.$proxy + '/bill/disclosure/download/template',
                responseType: 'blob'
            }).then(res => {
                this.$utils.downloadFile(res)
            }).catch(err => {
                this.$message.error("请求处理失败" + err)
            })
        },
        ...mapMutations({toLogout: 'Authorize'})
    },
    mounted() {

    },
    beforeDestroy() {

    }
}
</script>

<style scoped>
</style>